var $z1Enemy = require("Enemy");
cc.Class({
  extends: $z1Enemy,
  properties: {
    groundNode: cc.Node
  },
  initBy: function (t, e, n, o) {
    $z1Enemy.prototype.initBy.call(this, t, e, n, o);
    this.groundNode.parent = this.scene.ground;
    this.groundNode.position = this.node.position;
  },
  update: function (t) {
    $z1Enemy.prototype.update.call(this, t);
    this.groundNode && (this.groundNode.position = this.node.position);
  },
  hurtBy: function (t, e) {
    if (!(this.hp <= 0)) {
      $z1Enemy.prototype.hurtBy.call(this, t, e);
      if (this.hp <= 0 && this.groundNode) {
        this.groundNode.parent = null, this.groundNode = null;
      }
    }
  }
});